/**
 * Licensed under the Common Development and Distribution License,
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *   http://www.sun.com/cddl/
 *   
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
 * implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */

package facelets;

import com.sun.facelets.tag.AbstractTagLibrary;

/**
 * @version $Id: TomahawkLibrary.java,v 1.2 2007/03/15 12:36:06 nachoe Exp $
 */
public final class TomahawkLibrary extends AbstractTagLibrary {

    public final static String Namespace = "http://myfaces.apache.org/tomahawk";

    public final static TomahawkLibrary Instance = new TomahawkLibrary();

    public TomahawkLibrary() {
        super(Namespace);

        this.addComponent("commandButton", "org.apache.myfaces.HtmlCommandButton", "org.apache.myfaces.Button");

        this.addComponent("commandLink", "org.apache.myfaces.HtmlCommandLink", "org.apache.myfaces.Link");

        this.addComponent("headerLink", "org.apache.myfaces.HtmlHeaderLink", "org.apache.myfaces.Link");
        
        this.addComponent("dojoInitializer", "org.apache.myfaces.DojoInitializer", "org.apache.myfaces.DojoInitializerRenderer");
        
        this.addComponent("inputHidden", "org.apache.myfaces.HtmlInputHidden", null);
        
        this.addComponent("inputSecret", "org.apache.myfaces.HtmlInputSecret", "org.apache.myfaces.Secret");
        
        this.addComponent("inputText", "org.apache.myfaces.HtmlInputText", "org.apache.myfaces.Text");
        
        this.addComponent("inputTextHelp", "org.apache.myfaces.HtmlInputTextHelp", "org.apache.myfaces.TextHelp");
        
        this.addComponent("inputTextarea", "org.apache.myfaces.HtmlInputTextarea", "org.apache.myfaces.Textarea");
        
        this.addComponent("graphicImage", "org.apache.myfaces.HtmlGraphicImage", "org.apache.myfaces.Image");
        
        this.addComponent("message", "org.apache.myfaces.HtmlMessage", "org.apache.myfaces.Message", facelets.component.MessageComponentHandler.class);
        
        this.addComponent("messages", "org.apache.myfaces.HtmlMessages", "org.apache.myfaces.Messages");
        
        this.addComponent("outputLabel", "org.apache.myfaces.HtmlOutputLabel", null);
        
        this.addComponent("outputText", "org.apache.myfaces.HtmlOutputText", "org.apache.myfaces.Text");
        
        this.addComponent("panelGrid", "org.apache.myfaces.HtmlPanelGrid", "org.apache.myfaces.Grid");
        
        this.addComponent("panelGroup", "org.apache.myfaces.HtmlPanelGroup", "org.apache.myfaces.Group");
        
        this.addComponent("selectOneMenu", "org.apache.myfaces.HtmlSelectOneMenu", "org.apache.myfaces.Menu");
        
        this.addComponent("selectManyMenu", "org.apache.myfaces.HtmlSelectManyMenu", "org.apache.myfaces.Menu");
        
        this.addComponent("selectOneRadio", "org.apache.myfaces.HtmlSelectOneRadio", "org.apache.myfaces.Radio");
        
        this.addComponent("selectBooleanCheckbox", "org.apache.myfaces.HtmlSelectBooleanCheckbox", "org.apache.myfaces.Checkbox");
        
        this.addComponent("selectOneListbox", "org.apache.myfaces.HtmlSelectOneListbox", "org.apache.myfaces.Listbox");
        
        this.addComponent("selectManyListbox", "org.apache.myfaces.HtmlSelectOneListbox", "org.apache.myfaces.Listbox");
        
        this.addComponent("selectItems", "org.apache.myfaces.UISelectItems", null);
        
        this.addComponent("inputCalendar", "org.apache.myfaces.HtmlInputCalendar", null, facelets.component.InputCalendarComponentHandler.class);
        
        this.addComponent("jsValueChangeListener", "org.apache.myfaces.JsValueChangeListener", null);
        
        this.addComponent("jsValueSet", "org.apache.myfaces.HtmlJsValueSet", null);
        
        this.addComponent("checkbox", "org.apache.myfaces.HtmlCheckbox", null);
        
        this.addComponent("dataTable", "org.apache.myfaces.HtmlDataTable", 
				"org.apache.myfaces.Table", facelets.component.DataTableComponentHandler.class);
        
        
        this.addComponent("commandNavigation", "org.apache.myfaces.HtmlCommandNavigation", "org.apache.myfaces.Navigation");
        
        this.addComponent("commandNavigation2", "org.apache.myfaces.HtmlCommandNavigationItem", "org.apache.myfaces.NavigationMenu");
        
        this.addComponent("commandSortHeader", "org.apache.myfaces.HtmlCommandSortHeader", "org.apache.myfaces.SortHeader");
        
        this.addComponent("dataList", "org.apache.myfaces.HtmlDataList", null);
        
        this.addComponent("dataScroller", "org.apache.myfaces.HtmlDataScroller", null);
        
        this.addComponent("inputDate", "org.apache.myfaces.HtmlInputDate", null);
        
        this.addComponent("inputFileUpload", "org.apache.myfaces.HtmlInputFileUpload", null);
        
        this.addComponent("inputHtml", "org.apache.myfaces.InputHtml", null);
        
        this.addComponent("navigationMenuItem", "org.apache.myfaces.NavigationMenuItem", null);
        
        this.addComponent("navigationMenuItems", "javax.faces.SelectItems", null);
        
        this.addComponent("jscookMenu", "org.apache.myfaces.JSCookMenu", null);
        
        this.addComponent("panelLayout", "org.apache.myfaces.HtmlPanelLayout", null);
        
        this.addComponent("panelNavigation", "org.apache.myfaces.HtmlPanelNavigation", null);
    
        this.addComponent("panelNavigation2", "org.apache.myfaces.HtmlPanelNavigationMenu", "org.apache.myfaces.NavigationMenu");

        this.addComponent("panelTab", "org.apache.myfaces.HtmlPanelTab", "javax.faces.Group");
        
        this.addComponent("panelTabbedPane", "org.apache.myfaces.HtmlPanelTabbedPane", 
        		"org.apache.myfaces.TabbedPane", org.apache.myfaces.custom.tabbedpane.HtmlPanelTabbedPaneTagHandler.class);
        
        //this.addTagHandler("tabChangeListener", org.apache.myfaces.custom.tabbedpane.TabChangeListenerTagHandler.class);
        
        this.addComponent("collapsiblePanel", "org.apache.myfaces.HtmlCollapsiblePanel", null);
        
        this.addComponent("selectOneCountry", "org.apache.myfaces.SelectOneCountry", null);
        
        this.addComponent("selectOneLanguage", "org.apache.myfaces.SelectOneLanguage", null);
        
        this.addComponent("stylesheet", "org.apache.myfaces.Stylesheet", null);
        
        this.addComponent("div", "org.apache.myfaces.Div", null);
        
        this.addComponent("htmlTag", "org.apache.myfaces.HtmlTag", null);
        
        this.addComponent("radio", "org.apache.myfaces.HtmlRadio", null);
        
        this.addComponent("tree", "org.apache.myfaces.HtmlTree", "org.apache.myfaces.HtmlTree");
        
        this.addComponent("treeColumn", "org.apache.myfaces.HtmlTreeColumn", null);
        
        this.addComponent("treeCheckbox", "org.apache.myfaces.HtmlTreeCheckbox", null);
        
        this.addComponent("tree2", "org.apache.myfaces.HtmlTree2", null);
        
        this.addComponent("panelStack", "org.apache.myfaces.HtmlPanelStack", null);
        
        this.addComponent("popup", "org.apache.myfaces.HtmlPopup", 
        			null, facelets.component.PopupComponentHandler.class);
        
        this.addComponent("newspaperTable", "org.apache.myfaces.HtmlNewspaperTable", null);
        
        this.addComponent("aliasBean", "org.apache.myfaces.AliasBean", null);
        
        this.addComponent("aliasBeansScope", "org.apache.myfaces.AliasBeansScope", null);
        
        this.addComponent("buffer", "org.apache.myfaces.Buffer", null);
        
        this.addComponent("saveState", "org.apache.myfaces.SaveState", null);
        
//        this.addTagHandler("updateActionListener", facelets.component.UpdateActionListenerHandler.class);
        
        this.addValidator("validateCreditCard", "org.apache.myfaces.validator.CreditCard");
        
        this.addValidator("validateEmail", "org.apache.myfaces.validator.Email");
        
        this.addValidator("validateEqual", "org.apache.myfaces.validator.Equal");
        
        this.addComponent("swapImage", "org.apache.myfaces.HtmlSwapImage", null);
        
        this.addComponent("columns", "org.apache.myfaces.HtmlColumns", null);
        
        this.addComponent("column", "org.apache.myfaces.HtmlColumn", null);
        
        // additional validators (note: not in tld, so no code completion)
        this.addValidator("validateRegExpr", "org.apache.myfaces.validator.RegExpr");
        
        this.addComponent("document", "org.apache.myfaces.Document", null);
        
        this.addComponent("documentHead", "org.apache.myfaces.DocumentHead", null);
        
        this.addComponent("documentBody", "org.apache.myfaces.DocumentBody", null);
        
        this.addComponent("selectManyCheckbox", "org.apache.myfaces.HtmlSelectManyCheckbox", null);
        
        this.addComponent("selectManyPicklist", "org.apache.myfaces.HtmlSelectManyPicklist", "org.apache.myfaces.PicklistRenderer",facelets.component.PickListComponentHandler.class);
        
        this.addComponent("subform", "org.apache.myfaces.SubForm", "org.apache.myfaces.SubForm");
        
    }
    
    /*
    <tag>
		<tag-name>updateActionListener</tag-name>
		<handler-class>facelets.component.UpdateActionListenerHandler</handler-class>
	</tag>
    <tag>
        <tag-name>validateCreditCard</tag-name>
        <validator>
            <validator-id>org.apache.myfaces.validator.CreditCard</validator-id>
        </validator>
    </tag>
    <tag>
        <tag-name>validateEmail</tag-name>
        <validator>
            <validator-id>org.apache.myfaces.validator.Email</validator-id>
        </validator>
    </tag>
    <tag>
        <tag-name>validateEqual</tag-name>
        <validator>
            <validator-id>org.apache.myfaces.validator.Equal</validator-id>
        </validator>
    </tag>
    <!-- additional validators (note: not in tld, so no code completion) -->
    <tag>
        <tag-name>validateRegExpr</tag-name>
        <validator>
            <validator-id>org.apache.myfaces.validator.RegExpr</validator-id>
        </validator>
    </tag>
    
     */
}
